Hi @martin @jcalcada - Just checking if you can help me to get the report with * Specific to Escalation Policy and Customized Date/time.
Introducing a new PagerDuty CLI
The basic_incident_details routine looks at incident details but unfortunately the Escalation Policy isnât part of the payload. To get that information youâll need to look at the service associated with the incident and then lookup the EP from there.
The routine allows you to use a customized date/time instead of the pd-cli tools easier to use syntax such as âyesterdayâ. You can get more details on how to customize the date here https://developer.pagerduty.com/api-reference for more details.
Thanks @jcalcada - Apologies for the wrong question asked.
Can you please add specific service ( for example - Test), what should be the code looks like.
CC - @martin
Hi @martin @jcalcada - Let me know if I need to add service into the script -
Let me what I am missing here to get the service name in the Report.
C:\Users\gargv>py C:\PD_Scripts\Incident-Notes-New3.py --services=MiCloudFlex_MiNOC --output_file C:\PD_Scripts\TestIncidentnotes4.csv --start â1 day agoâ
Getting incidents⊠got 116
Getting incident logs⊠got 1163 log entries
Traceback (most recent call last):
File âC:\PD_Scripts\Incident-Notes-New3.pyâ, line 81, in
incident[âservicesâ],
KeyError: âservicesâ
Hi @jcalcada @martin - Appreciate your help here as looking for the solution on this Pagerduty reporting
If you run a GET API call on an incident (you can use the snippet below for example output), youâll see it contains the service name and id. Youâll need to factor that into your code and you can certainly get that information from incident details. If you need help with developing a more robust solution one option you have is to leverage our professional services organization who would be happy to create something for you for a nominal cost.
echo âenter incident id:â
read A
curl --request GET
âurl âhttps://api.pagerduty.com/incidents/{$A}?include[]=external_referencesâ
âheader âAccept: application/vnd.pagerduty+json;version=2â
âheader âAuthorization: Token token=yourkeyâ
âheader âContent-Type: application/jsonâ
Hi Thanks @jcalcada - Just checking the cost for PD Professional services to create a one time solution in PD CLI for Reporting purpose.
Great. Your PagerDuty account executive can provide information on the professional services options available to you.